<%--
  Created by IntelliJ IDEA.
  User: 邓星源
  Date: 2019/7/4
  Time: 15:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script src="./js/jquery.min.js"></script>
<script>
    $(function () {
        $("#a").click(function () {
            alert("ok")
            $.ajax({
                url:"he/jax",
                contentType:"application/json;charset=UTF-8",
                data:'{"age":30,"username":"tom","password":"123"}',
                dataType:"json",
                type:"post",
                success:function(data){
                    alert(data);
                    alert(data.username);
                    alert(data.password);
                    alert(data.age);
                }

            });
        })
    })
</script>
<body>
<a href="he/hello2">hello</a>
<a href="he/forword222">forword</a>
<form action="he/hello/18" method="post">
    <input type="hidden" name="_method" value="PUT">
    <input type="submit" value="put"/>
</form>
<hr>
<input type="button" id="a" value="这是一个按钮"/>

</body>
</html>
